The fusebox.xml File

Here is a very basic fusebox.xml file to refer to as we cover the XML elements:

<?xml version="1.0" encoding="UTF-8"?>
<fusebox>
<circuits>
<circuit alias="m" path="model/" parent=""/>
<circuit alias="v" path="view/" parent=""/>
<circuit alias="main" path="controller/" parent=""/>
</circuits>
<classes>
</classes>
<parameters>
<parameter name="fuseactionVariable" value="method" />
<parameter name="defaultFuseaction" value="main.welcome" />
<parameter name="precedenceFormOrUrl" value="form"/>
<parameter name="mode" value="development"/>
<parameter name="password" value=""/>
<parameter name="parseWithComments" value="true" />
<parameter name="conditionalParse" value="true" />
<parameter name="scriptlanguage" value="cfmx" />
<parameter name="scriptFileDelimiter" value="cfm"/>
<parameter name="maskedFileDelimiters" value="htm,cfm,cfml,php,php4,asp,aspx"/>
<parameter name="characterEncoding" value="utf-8"/>
</parameters>
<globalfuseactions>
<preprocess></preprocess>
<postprocess></postprocess>
</globalfuseactions>
<plugins>
<phase name="preProcess"></phase>
<phase name="preFuseaction"></phase>
<phase name="postFuseaction"></phase>
<phase name="fuseactionException"></phase>
<phase name="postProcess"></phase>
<phase name="processError"></phase>
</plugins>
</fusebox>

A Fusebox application has only one fusebox.xml file. It is located in the root directory of the application. In version 4 the Fusebox core files were also located in the application root but in versions 4.1 and 5 they can be located anywhere under the ColdFusion root. This allows one copy of the fusebox core to be shared by several applications.

The <fusebox> tag can declare XML namespaces that let you use custom attributes on classes and plugins. This file is the foundation for your entire application. This XML file consists of the root element, fusebox, and five primary sub-elements: